package com.cardbaobao.cardbabyclient.ui.activity;

import android.os.Bundle;
import android.view.View;

import com.cardbaobao.cardbabyclient.R;
import com.cardbaobao.cardbabyclient.buried.Self;
import com.cardbaobao.cardbabyclient.model.Event;
import com.cardbaobao.cardbabyclient.ui.activity.base.BaseActivity;
import com.cardbaobao.cardbabyclient.buried.GoogleAnalyticsUtil;
import com.cardbaobao.cardbabyclient.widget.TitleBar;

import org.greenrobot.eventbus.EventBus;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by Jiangzx on 2017/9/14 11:15.
 */

public class ReplaceCardSuccessActivity extends BaseActivity {
    @BindView(R.id.title_bar)
    TitleBar titleBar;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_replace_card_success;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        super.initView(savedInstanceState);
        titleBar.setLeftViewOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

        mCurrentPageId= Self.Page.app_replace_debit_card_success_page;
    }

    @Override
    protected void onResume() {
        super.onResume();
        GoogleAnalyticsUtil.setScreenName("更换银行卡成功");
    }

    @OnClick(R.id.bt_go_back)
    public void onClick(View view){
        switch (view.getId()){
            case R.id.bt_go_back:
                finish();
                break;
        }
    }

    @Override
    public void finish() {
        EventBus.getDefault().post(new Event.BindCardRepaySuc());
        super.finish();
    }
}
